<div class="card-head">
    <span class="ft-primary">监听配置</span>
    <a class="card-new pull-right ft-normal" [routerLink]="['/client/eventlisten/add']">
        <font>新增</font>
    </a>
</div>

<div class="card">
    <div class="card-search">
        <div class="row">
            <div class="col-md-2">
                <input type="text" class="form-control" [(ngModel)]="etype" placeholder="请输入事件类型">
            </div>
            <div class="col-md-2">
                <input type="text" class="form-control" [(ngModel)]="action" placeholder="请输入事件行为">
            </div>
            <div class="col-md-8">
                <button type="button" class="exbtn exbtn-primary" (click)="search()">搜索</button>
            </div>
        </div>
    </div>

    <table class="table  table-hover table-striped">
        <thead>
            <tr>
                <th width="70px">序号</th>
                <th>类型</th>
                <th>行为</th>
                <th>回调链接</th>
                <th width="170px">操作</th>
            </tr>
        </thead>
        <tbody *ngIf="isNull!=1">

            <tr *ngFor="let item of datas;let i=index;">
                <td align="center">{{i+1}}</td>
                <td align="center">{{item.etype}}</td>
                <td align="center">{{item.action}}</td>
                <td align="center">{{item.hookurl}}</td>
                <td align="center">
                    <button type="button" class="btn btn-sm btn-info" (click)="edit(item.rid)">编辑</button>
                    <button type="button" class="btn btn-sm btn-danger" (click)="del(item)">删除</button>
                </td>
            </tr>

        </tbody>
        <tr *ngIf="isNull==1">
            <td colspan="5" class="text-sm-center">未查询到相关信息</td>
        </tr>
        <tfoot>
            <tr *ngIf="isNull!=1">
                <td colspan="5" class="text-sm-center">
                    <button type="button" *ngIf="isPrevpage" class="btn btn-sm btn-info" (click)="prevPage()">上页</button>
                    <button type="button" *ngIf="isNextpage" class="btn btn-sm btn-danger" (click)="nextPage()">下页</button> [{{page}}/{{sumpage }}/{{total}}]
                </td>
            </tr>
        </tfoot>
    </table>
</div>